<template>
	<view class="brand">
		<view class="h2">品牌制造商直供</view>
		<view class="brand-box">
			<view class="ul">
				<view class="li" v-for="(item,index) in brandList" @click='brandjump(item.id)'>
					<view class="h4">{{item.name}}</view>
					<image :src="item.picUrl"></image>
					<view class="brand-title"><view class="brand-text">{{item.floorPrice}}元起</view></view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:'Brand',
		props: {
			brandList: {
				type: Array
			}
		},
		data() {
			return {};
		},
		methods: {
			brandjump(id){
				uni.navigateTo({
					url:'../../pages/branddetails/branddetails?id='+id
				})
			}
			
		}
	};
</script>

<style lang="scss" scoped>
	$marginBottom: 30rpx;
	$backColor: #f4f4f4;
	@import 'uview-ui/index.scss';

	.brand {
		margin-top: $marginBottom;
		background-color: $uni-bg-color;

		.h2 {
			text-align: center;
			font-size: 40rpx;
			padding: $marginBottom;
			line-height: 60px;
		}

		.brand-box {
			.ul {

				&:after,
				&:before {
					display: table;
					clear: both;
					content: '';
				}

				.li {
					
					float: left;
					width: 25%;
					overflow: hidden;
					position: relative;
					.brand-title {
						text-align: center;
						image {
							z-index: -1;
							width: 20vw;
							height: 100vh;
						}
						.brand-text {
							z-index: 9;
							color: $uni-color-warning;
							margin-bottom: 20rpx;
						}

					}

					.h4 {
						text-align: center;
						width: 100%;
						z-index: 9;
						top: 0;
						position: absolute;
						color: #FFFFFF;
					}
				}
			}
		}
	}
</style>
